package com.codeduck.injection;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author: <a href="mailto:codeduck@163.com">Codeduck</a>
 * @createDate: 2021-12-24
 */
@SpringBootApplication
public class BeanInjectionApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = new SpringApplicationBuilder(BeanInjectionApplication.class)
                .web(WebApplicationType.NONE)
                .profiles("dev") // profiles = test/dev 不同环境下注入不同的Bean
                .run(args);
        // 容器创建完毕
    }
}
